package models

import "gorm.io/gorm"

// Jobs: 职位表，包含字段：职位号（在gorm.Model中）、企业号（外键）、职位名、类别、学历要求、薪资、业务、融资情况、工时、招聘对象、工作地点、状态（文本，招聘中、已结束）、简介（长文本）、团体规模
type Jobs struct {
	gorm.Model
	CompanyId    uint      `gorm:"type:int(10);not null;"`
	JobName      string    `gorm:"type:varchar(20);not null;"`
	Sort         string    `gorm:"type:varchar(20);not null;"`
	Education    string    `gorm:"type:varchar(20);not null;"`
	Salary       string    `gorm:"type:varchar(20);not null;"`
	Business     string    `gorm:"type:varchar(20);not null;"`
	Financing    string    `gorm:"type:varchar(20);not null;"`
	WorkTime     string    `gorm:"type:varchar(20);not null;"`
	Target       string    `gorm:"type:varchar(20);not null;"`
	Location     string    `gorm:"type:varchar(20);not null;"`
	Status       string    `gorm:"type:varchar(20);not null;"`
	Introduction string    `gorm:"type:varchar(512);not null;"`
	Companies    Companies `gorm:"foreignKey:CompanyId"`
	Place        string    `gorm:"type:varchar(512);not null;"`
	Teamsize     string    `gorm:"type:varchar(20);not null;"`
}

// Init Data
var JobsInitData = []Jobs{
	{
		CompanyId:    5,
		JobName:      "能源安全研发人员",
		Sort:         "太阳能科技企业",
		Education:    "本科",
		Salary:       "7K-11K",
		Business:     "光伏能源 | 咨询、能源安全",
		Financing:    "不需要融资",
		WorkTime:     "4天/周",
		Target:       "2022届毕业生",
		Location:     "上海、浙江、江西等地区",
		Status:       "招聘中",
		Introduction: "./source/jobs/晶科能源股份有限公司-能源安全研发人员.txt",
		Teamsize:     "100-499人",
	},
}
